package com.yzc.mihuyou.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 评论表
 * </p>
 *
 * @author 易紫诚
 * @since 2022-04-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Comment对象", description="评论表")
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "评论id")
    @TableId(value = "comment_id", type = IdType.AUTO)
    private Integer commentId;

    @ApiModelProperty(value = "评论内容")
    private String content;

    @ApiModelProperty(value = "帖子id")
    private Integer blogId;

    @ApiModelProperty(value = "父评论的id（被回复的评论）")
    private Integer parentId;

    @ApiModelProperty(value = "根评论的id（最顶级的评论)")
    private Integer rootParentId;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "评论时间")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "点赞数量")
    private  Long giveNum;

    @ApiModelProperty(value = "状态")
    private  Integer givWe;

    @TableField(exist = false,value = "评论的数量")
    private List<Comment> child;

    @TableField(exist = false,value = "评论用户")
    private  User user;

    @TableField(exist = false,value = "回复的谁")
    private  User uwer2;

    @TableField(exist = false,value = "点赞时间")
    private Date pCreat;

    @TableField(exist = false,value = "点赞用户")
    private Object userIds;

    @TableField(exist = false,value = "上级评论")
    private  String parentContent;


    @TableField(exist = false,value = "是否点赞")
    private  Boolean trie;
}
